package org.stwy.lease.repay;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.stwy.lease.contract.ContractEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rap.common.annotation.MetaData;
import com.rap.common.entity.AuditableEntity;
import com.rap.common.entity.BaseEntity;

/**
*版权信息 (c) RAP 保留所有权利.
*@author Rap.Codegen
*@Team RAP Team
*@Date 2015-4-25 10:23:18
*<p></p>
*
*@参与人：Rap.Codegen
*/
 
@MetaData(value = "补交租金")
@Entity
@Table(name = "stwy_repay")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class RepayEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
	@MetaData(value = "合同")
	@ManyToOne
	@JoinColumn(name = "contractId")
	private ContractEntity contract;
	
	@MetaData(value = "补交起始日期",comments="" )
	@Column(nullable = true)
		@Temporal(TemporalType.DATE)
	private Date beginDate;
	
	@MetaData(value = "补交结束日期",comments="" )
	@Column(nullable = true)
		@Temporal(TemporalType.DATE)
	private Date endDate;
	
	@MetaData(value = "补交金额",comments="" )
	@Column(nullable = false)
	private Double money;
	
	@MetaData(value = "备注",comments="" )
	@Column(nullable = true,length = 1000)
	private String remark;
	
	
	
	public ContractEntity getContract() {
		return contract;
	}
	public void setContract(ContractEntity contract) {
		this.contract = contract;
	}
	/**
	 * 补交起始日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getBeginDate(){
		return this.beginDate;
	}
	public void setBeginDate(Date beginDate){
		this.beginDate = beginDate;
	}
	/**
	 * 补交结束日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
	public Date getEndDate(){
		return this.endDate;
	}
	public void setEndDate(Date endDate){
		this.endDate = endDate;
	}
	/**
	 * 补交金额
	 */
	public Double getMoney(){
		return this.money;
	}
	public void setMoney(Double money){
		this.money = money;
	}
	/**
	 * 备注
	 */
	public String getRemark(){
		return this.remark;
	}
	public void setRemark(String remark){
		this.remark = remark;
	}
	
}
